package cn.com.Kol.ITPMP.TenMajorAreas.model;

import cn.com.Kol.ITPMP.System.Area;
import cn.com.Kol.ITPMP.System.Process;

import static cn.com.Kol.ITPMP.System.Constants.*;

public class CommunicationManagement extends Area {

    private Process MakeCommunicationManagementPlan = new Process(MAKE_COMMUNICATION_MANAGEMENT_PLAN);
    private Process ManageCommunication = new Process(MANAGE_COMMUNICATION);
    private Process ControlCommunication = new Process(CONTROL_COMMUNICATION);

    private void CommunicationManagementProcess(){
        CreateProcess(MakeCommunicationManagementPlan);
        CreateProcess(ManageCommunication);
        CreateProcess(ControlCommunication);
    }

    public void SetInputs(Process process){
        switch (process.getProcessName()){
            case "规划沟通管理":
                process.inputs(PROJECT_MANAGEMENT_PLAN);
                process.inputs(STAKEHOLDER_REGISTER);
                process.inputs(ENTERPRISE_ENVIRONMENTAL_FACTORS);
                process.inputs(ORGANIZATIONAL_PROCESS_ASSETS);
                break;
            case "管理沟通":
                process.inputs(COMMUNICATION_MANAGEMENT_PLAN);
                process.inputs(WORK_PERFORMANCE_REPORT);
                process.inputs(ENTERPRISE_ENVIRONMENTAL_FACTORS);
                process.inputs(ORGANIZATIONAL_PROCESS_ASSETS);
                break;
            case "控制沟通":
                process.inputs(PROJECT_MANAGEMENT_PLAN);
                process.inputs(PROJECT_COMMUNICATION);
                process.inputs(ISSUE_LOG);
                process.inputs(WORK_PERFORMANCE_DATA);
                process.inputs(ORGANIZATIONAL_PROCESS_ASSETS);
                break;

        }
    }

    public void UseToolAndTech(Process process){
        switch (process.getProcessName()){
            case "规划沟通管理":
                process.useToolAndTech(COMMUNICATION_REQUIREMENTS_ANALYSIS);
                process.useToolAndTech(COMMUNICATIONS_TECHNOLOGY);
                process.useToolAndTech(COMMUNICATIONS_MODEL);
                process.useToolAndTech(COMMUNICATIONS_METHOD);
                process.useToolAndTech(CONFERENCE);
                break;
            case "管理沟通":
                process.useToolAndTech(COMMUNICATIONS_TECHNOLOGY);
                process.useToolAndTech(COMMUNICATIONS_MODEL);
                process.useToolAndTech(COMMUNICATIONS_METHOD);
                process.useToolAndTech(INFORMATION_MANAGEMENT_SYSTEM);
                process.useToolAndTech(PERFORMANCE_REPORT);
                break;
            case "控制沟通":
                process.useToolAndTech(INFORMATION_MANAGEMENT_SYSTEM);
                process.useToolAndTech(EXPERT_JUDGEMENT);
                process.useToolAndTech(CONFERENCE);
                break;
        }
    }

    public void SetOutputs(Process process){
        switch (process.getProcessName()){
            case "规划沟通管理":
                process.outputs(COMMUNICATION_MANAGEMENT_PLAN);
                process.outputs(PROJECT_FILE_UPDATE);
                break;
            case "管理沟通":
                process.outputs(PROJECT_COMMUNICATION);
                process.outputs(PROJECT_MANAGEMENT_PLAN_UPDATE);
                process.outputs(PROJECT_FILE_UPDATE);
                process.outputs(ORGANIZATIONAL_PROCESS_ASSETS_UPDATE);
                break;
            case "控制沟通":
                process.outputs(WORK_PERFORMANCE_INFO);
                process.outputs(CHANGE_REQUESTS);
                process.outputs(PROJECT_MANAGEMENT_PLAN_UPDATE);
                process.outputs(PROJECT_FILE_UPDATE);
                process.outputs(ORGANIZATIONAL_PROCESS_ASSETS_UPDATE);
                break;
        }

    }
    

}
